Skip to content

drivers: modem: Add BG9X Kconfig dependency #93105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

guildeol-stra
Copy link

@guildeol-stra guildeol-stra commented Jul 14, 2025

The modem subsystem cannot be enabled for systems using the 'quectel,bg9x' driver. Fix it by adding DT_HAS_QUECTEL_BG9X_ENABLED dependency to MODEM_CELLULAR Kconfig option.

Fixes #93115

Copy link

Hello @guildeol-stra, and thank you very much for your first pull request to the Zephyr project!
Our Continuous Integration pipeline will execute a series of checks on your Pull Request commit messages and code, and you are expected to address any failures by updating the PR. Please take a look at our commit message guidelines to find out how to format your commit messages, and at our contribution workflow to understand how to update your Pull Request. If you haven't already, please make sure to review the project's Contributor Expectations and update (by amending and force-pushing the commits) your pull request if necessary.
If you are stuck or need help please join us on Discord and ask your question there. Additionally, you can escalate the review when applicable. 😊

@guildeol-stra
Copy link
Author

Hi, @rerickson1

I think the LTS versions could benefit from this. Can this also be backported?

@rerickson1 rerickson1 added bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc. labels Jul 14, 2025
@rerickson1
Copy link
Member

Hi, @rerickson1

I think the LTS versions could benefit from this. Can this also be backported?

Does this issue exist in 3.7?

@guildeol-stra
Copy link
Author

Hi, @rerickson1
I think the LTS versions could benefit from this. Can this also be backported?

Does this issue exist in 3.7?

Yes. We use 3.7 as our base version and we first identified the issue there.

@rerickson1
Copy link
Member

Hi, @rerickson1
I think the LTS versions could benefit from this. Can this also be backported?

Does this issue exist in 3.7?

Can you please writeup a issue quick so it can be linked to this PR?
This is the official process that should be followed when including a fix like this.

@rerickson1 rerickson1 added the backport v3.7-branch Request backport to the v3.7-branch label Jul 14, 2025
The modem subsystem cannot be enabled for systems using the
'quectel,bg9x' driver. Fix it by adding
DT_HAS_QUECTEL_BG9X_ENABLED dependency to MODEM_CELLULAR
Kconfig option.

Signed-off-by: Guilherme Costa <guilhermecosta@stratioautomotive.com>
@guildeol-stra guildeol-stra force-pushed the add_quectel_bg9x_modem_cellular_dts branch from 984c80a to a99767a Compare July 14, 2025 15:16
@guildeol-stra
Copy link
Author

guildeol-stra commented Jul 14, 2025

Hi, @rerickson1
I think the LTS versions could benefit from this. Can this also be backported?

Does this issue exist in 3.7?

Can you please writeup a issue quick so it can be linked to this PR? This is the official process that should be followed when including a fix like this.

Done. Added the link and also amended my commit message because this did not cause a compilation issue, just disabled the config implicitly.

Please let me know if there's anything else needed.

Copy link

@rerickson1
Copy link
Member

Hi, @rerickson1
I think the LTS versions could benefit from this. Can this also be backported?

Does this issue exist in 3.7?

Can you please writeup a issue quick so it can be linked to this PR? This is the official process that should be followed when including a fix like this.

Done. Added the link and also amended my commit message because this did not cause a compilation issue, just disabled the config implicitly.

Please let me know if there's anything else needed.

Looks good. We'll see if its possible to get this bug fix in for 4.2. If not, it will come after.

Copy link
Collaborator

@bjarki-andreasen bjarki-andreasen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was by design :) the bg9x compat is a relic used only by the quectel-bg9x.c driver, modem_cellular (and zephyr in general) requires the devicetree to have specific device compats in the devicetree, like quectel,bg95 (which is why it was added and is used by the modem subsystem)

To elaborate a bit, quectel,bg9x is a malformed devicetree compatible, not a driver :) quectel-bg9x.c and modem_ceullar.c are drivers. These support specific hardware, which is what devicetree compatibles specify. If you have a bg95, or bg96 (something matching the "wildcard" bg9x), that compatible has to be added to zephyr, and the modem_cellular.c driver expanded to support it :)

@rerickson1 rerickson1 removed bug The issue is a bug, or the PR is fixing a bug Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc. backport v3.7-branch Request backport to the v3.7-branch labels Jul 14, 2025
@rerickson1
Copy link
Member

That was by design :) the bg9x compat is a relic used only by the quectel-bg9x.c driver, modem_cellular (and zephyr in general) requires the devicetree to have specific device compats in the devicetree, like quectel,bg95 (which is why it was added and is used by the modem subsystem)

To elaborate a bit, quectel,bg9x is a malformed devicetree compatible, not a driver :) quectel-bg9x.c and modem_ceullar.c are drivers. These support specific hardware, which is what devicetree compatibles specify. If you have a bg95, or bg96 (something matching the "wildcard" bg9x), that compatible has to be added to zephyr, and the modem_cellular.c driver expanded to support it :)

And this is why multiple sets of eyes is best! This isn't really a bug then, right? This should technically be a new feature?

@bjarki-andreasen
Copy link
Collaborator

That was by design :) the bg9x compat is a relic used only by the quectel-bg9x.c driver, modem_cellular (and zephyr in general) requires the devicetree to have specific device compats in the devicetree, like quectel,bg95 (which is why it was added and is used by the modem subsystem)
To elaborate a bit, quectel,bg9x is a malformed devicetree compatible, not a driver :) quectel-bg9x.c and modem_ceullar.c are drivers. These support specific hardware, which is what devicetree compatibles specify. If you have a bg95, or bg96 (something matching the "wildcard" bg9x), that compatible has to be added to zephyr, and the modem_cellular.c driver expanded to support it :)

And this is why multiple sets of eyes is best! This isn't really a bug then, right? This should technically be a new feature?

I believe so, but, looking at the commit, without modifications to modem_cellular.c, this PR would still not provide support for the bg9x compat, it would build the driver, but no driver would be instantiated, so maybe there's more to it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Modem Drivers priority: low Low impact/importance bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot enable MODEM_CELLULAR with 'quectel,bg9x' compatible
3 participants